home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / macintosh-c / macc-carbon-demos-nonbinhex.sit / macc-carbon-demos-nonbinhex / chap24-demo-carbon events / SoundAndSpeech.rsrc / STR#_130.txt < prev   
Text File  |  2001-08-08  |  1KB  |  11 lines

  1. SpeakString is called to speak a specified string resource.  Although SpeakString returns control to the application immediately it starts generating the speech, the speech channel it opens remains open until the speech concludes.
  2.  
  3. When the sound has finished playing, ASynchSoundLib advises the application by setting the application's "attention" flag to true.  This causes the application to call the AsynchSoundLib function AS_CloseChannel and then clear the "attention" flag.
  4.  
  5. SpeakString is called to speak a specified string resource.  Since the speech that SpeakString generates is asynchronous, SpeechBusy is used to delay the function in which SpeakString is called from returning until the speech channel closes.
  6.  
  7. siBetterQuality is passed in SndRecord‚Äôs quality parameter, meaning that recording will be at 22kHz, mono, 3:1 compression.  25,000 (bytes) is  passed in SndRecord‚Äôs sndHandle parameter.  The ‚Äòsnd ‚Äò resource is saved to the application‚Äôs resource fork. 
  8.  
  9. The 119,610-byte 'snd ' resource being used contains one command only (bufferCmd).  The compressed sound header indicates no compression.  The sound length is 119568 frames.  The 8-bit mono sound was sampled at 22kHz. 
  10.  
  11.